- content_for :popups do
  #add_part_popup.popup{:style => "display: none"}
    #add_part_busy.busy{:style => "display: none"}= image('spinner.gif', :alt => "")
    .popup_title= t('add_part')
    = form_for([:admin, PagePart.new], :html => { :onsubmit => "addPart(this); return false" }) do |f|
      %p
        %label{:for => 'part_name_field'}= t('name')
        = f.text_field :name, :id => 'part_name_field', :maxlength => 100, :style => "width: 15em", :class => "textbox big"
        = hidden_field_tag 'index', 0, :id => 'page_part_index_field'
      .buttons
        = submit_tag t('add_part'), :id => 'add_part_button', :class => "button"
        = t('or')
        = link_to_function t('cancel'), "$(this).closePopup()", :class=>"cancel"
  #add_field_popup.popup{:style=>"display: none"}
    #add_field_busy.busy{:style=>"display: none"}= image('spinner.gif', :alt => "")
    .popup_title= t('add_field')
    = form_for [:admin, PageField.new], :html => { :onsubmit => "event.stop(); addField(this)" } do |f|
      %p
        %label{:for=>"page_field_name"}= t('name')
        = f.text_field :name, :maxlength=>100, :class=>'textbox big', :style=>"width: 15em"
        = hidden_field_tag 'index', 2, :id=>'page_field_index_field'
        = hidden_field_tag 'page_field_counter', @page.fields.size
      .buttons
        = submit_tag t('add_field'), :class=>'button', :id=>'add_page_field_button'
        = t('or')
        = link_to_function t('cancel'), "$(this).closePopup()", :class=>"cancel"
  = render_region :popups
